package com.hzlx.service;

import com.hzlx.dao.BendingRepository;
import com.hzlx.entity.BendingMachineData;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class BendingService {
    @Resource
    BendingRepository bendingRepository;
    public BendingMachineData getBendingData() {
        // 20 秒前
        Date from = new Date(System.currentTimeMillis() - 20_000);
        System.out.println(from);
        return bendingRepository.findFirstByOrderByIdDesc();
    }
}
